public class ProblemTwo {

    public static void main(String[] args) {
	int count = 0;
	int previousSecond = 1;
	int previousFirst = 1;
	int sum = 0;
	while (count < 4000000)

	{
	    count = previousFirst + previousSecond;
	    if (count < 4000000 && count % 2 == 0)
		sum = sum + count;

	    previousFirst = previousSecond;
	    previousSecond = count;

	}

	System.out.println(sum);
    }

}
